package com.an.blog.web.domain.bo;

import com.an.common.core.validate.AddGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 博客好友链接网站博
 *
 * @author: Ann
 * @createDate: 2023/10/24 08:53:00
 * @version: 1.0.0
 */
@Data
public class BlogFriendLinkWebBo {

    /**
     * 博客标题
     */
    @NotBlank(message = "网站名称不能为空", groups = AddGroup.class)
    private String blogTitle;

    /**
     * 博客desc
     */
    @NotBlank(message = "网站描述不能为空", groups = AddGroup.class)
    private String blogDesc;

    /**
     * 博客logo图片
     */
    @Pattern(regexp = "(http|https)://[\\w-]+(\\.[\\w-]+)+([\\w-.,@?^=%&:/~+#]*[\\w-@?^=%&/~+#])?",
        message = "请输入规范的链接地址", groups = {AddGroup.class})
    private String blogLogoImage;

    /**
     * 博客地址
     */
    @Pattern(regexp = "(http|https)://[\\w-]+(\\.[\\w-]+)+([\\w-.,@?^=%&:/~+#]*[\\w-@?^=%&/~+#])?",
        message = "请输入规范的链接地址", groups = {AddGroup.class})
    private String blogAddress;
}
